let name = 'imooc';
let object1 = {
	name: name,
	getName: function () {
		console.log(this.name);
	}
};

// shortening
let object2 = {
	name,
	getName() {
		console.log(this.name);
	}
};

// expression
let key = ['imooc', 7];
let object3 = {
	[key]: 'value'
};
console.log(object3, object3[key]);
